package tests;

//This is the main one - Code Tester

//import java.awt.event.MouseListener;
//import java.util.Scanner;

import javax.swing.*;

//[attachmentid=10502]
public class GridSquare
{
    static GridSquareComponent gsc;
    
    private static final int INITIAL_WIDTH = 600;
    private int CURRENT_WIDTH = 600;
    private static final int INITIAL_HEIGHT = 400;
    private int CURRENT_HEIGHT = 400;
    
    public int getWidth() {
    	return this.CURRENT_WIDTH;
    }
    public int getHeight() {
    	return this.CURRENT_HEIGHT;
    }
    
    
    public static void main(String[] args)
    {
        JFrame frame;
        frame = new JFrame("Grid"); //Title
        frame.setSize(INITIAL_WIDTH,INITIAL_HEIGHT); // Size of Window
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Allows the program to end when click exit
        frame.setResizable(true); // User cannot resize the window
        gsc = new GridSquareComponent(40,40,frame);//Make a new component (gsc = gridsquarecomponent xD)
        //gsc = new Test2();
        frame.add(gsc); //add the gsc component to the frame
        GridSquareMouseListener gsml = new GridSquareMouseListener();

        
        frame.addMouseListener(gsml);
        frame.setVisible(true);
        /*Scanner s = new Scanner(System.in);
        while (true)
        {
            System.out.println(s.nextLine());
            //gsc.repaint();
        }
*/
    }
}
